{namespace lfe=SGalinski\Lfeditor\ViewHelpers}

<lfe:addJavaScriptFile javaScriptFile="{f:uri.resource(path: 'JavaScript/textareaResize.js')}" />

<lfe:addCssFile cssFile="{f:uri.resource(path: 'StyleSheets/Lfeditor.css')}" />

<f:be.container includeRequireJsModules="{
	0: 'TYPO3/CMS/Lfeditor/Lfeditor'
}" addJsInlineLabels="{
	0: 'function.langfile.confirmCancel',
	1: 'function.langfile.confirmChange',
	2: 'function.langfile.confirmCancel.title',
	3: 'function.langfile.confirmChange.title'
}">
	<div class="module">
		<div class="module-loading-indicator"></div>
		<div class="module-docheader t3js-module-docheader">
			<div class="module-docheader-bar module-docheader-bar-navigation t3js-module-docheader-bar t3js-module-docheader-bar-navigation row">
				<div class="module-docheader-bar-column-left col-xs-12 col-sm-4 col-md-3">
					<div class="form-inline row">
						<div class="form-group form-group-sm col-xs-6">
							<f:form.select additionalAttributes="{class: 'form-control t3-js-jumpMenuBox', onchange: 'TYPO3.lfEditor.jump(this)'}">
								<f:be.menus.actionMenuItem label="{f:translate(key:'function.general.general')}"
								                           controller="General"
								                           action="general" />
								<f:be.menus.actionMenuItem label="{f:translate(key:'function.langfile.edit')}"
								                           controller="EditFile"
								                           action="editFile"
								                           arguments="{buttonType: 0}" />
								<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.edit.edit')}"
								                           controller="EditConstant"
								                           action="editConstant" />
								<f:if condition="{defaultLanguagePermission}">
									<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.add.add')}"
									                           controller="AddConstant"
									                           action="addConstant" />
									<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.delete.delete')}"
									                           controller="DeleteConstant"
									                           action="deleteConstant" />
									<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.rename.rename')}"
									                           controller="RenameConstant"
									                           action="renameConstant" />
								</f:if>
								<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.search.search')}"
								                           controller="SearchConstant"
								                           action="searchConstant" />
								<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.treeview.treeview')}"
								                           controller="ViewTree"
								                           action="viewTree" />
								<f:if condition="{editingMode} == 'extension'">
									<f:be.menus.actionMenuItem label="{f:translate(key:'function.backupMgr.backupMgr')}"
									                           controller="ManageBackups"
									                           action="manageBackups" />
								</f:if>
							</f:form.select>
						</div>
						<f:if condition="{canChangeEditingModes}">
							<div class="form-group form-group-sm col-xs-6">
								<f:form.select additionalAttributes="{class: 'form-control t3-js-jumpMenuBox', onchange: 'TYPO3.lfEditor.jump(this)'}">
									<f:for each="{editingModeOptions}" key="editingModeOption" as="editingModeLabel">
										<f:if condition="{editingMode} == {editingModeOption}">
											<f:then>
												<f:be.menus.actionMenuItem label="{editingModeLabel}"
												                           controller="General"
												                           action="switchEditingMode"
												                           arguments="{editingMode: editingModeOption}"
												                           additionalAttributes="{selected: 'selected'}" />
											</f:then>
											<f:else>
												<f:be.menus.actionMenuItem label="{editingModeLabel}"
												                           controller="General"
												                           action="switchEditingMode"
												                           arguments="{editingMode: editingModeOption}" />
											</f:else>
										</f:if>
									</f:for>
								</f:form.select>
							</div>
						</f:if>
					</div>
				</div>
			</div>
			<div class="module-docheader-bar module-docheader-bar-buttons t3js-module-docheader-bar t3js-module-docheader-bar-buttons">
				<div class="module-docheader-bar-column-left">
					<div class="btn-toolbar">
						<f:render section="ButtonBarLeft" arguments="{displayBackButton: displayBackButton, displayNextButton: displayNextButton}" />
					</div>
				</div>
			</div>
		</div>
		<div class="module-body t3js-module-body">
			<div class="panel panel-default">
				<div class="panel-heading">
					<f:translate key="select.langfile" />
				</div>
				<div class="panel-body">
					<f:render section="selectItems" />
				</div>
			</div>
			<f:flashMessages />
			<f:render section="main" />
		</div>
	</div>
</f:be.container>
